package br.com.persist.api;

import java.util.Collection;
import java.util.Stack;

public class RuntimeExecutionException extends Exception {

	private static final long serialVersionUID = -9180596155386709171L;

	private Stack<Command> commands = new Stack<Command>();

	public RuntimeExecutionException(String message) {
		super(message);
	}

	public RuntimeExecutionException(String message, Throwable cause) {
		super(message, cause);
	}

	public void registerCommand(Command command) {
		commands.push(command);
	}

	public Collection<Command> getCommands() {
		return commands;
	}
}
